Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW: @W-17310939@: Add in our first AppExchange security rule... #173

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

stephen-carter-at-sf
Copy link
Collaborator

... to serve as a template for adding in more

@@ -312,14 +312,14 @@ abstract class SharedConfigValueExtractor {
const extToLangMap: Map<string, Language> = new Map(); // To keep track if file extension shows up with more than one language
const fileExtensionsMap: Record<Language, string[]> = {... DEFAULT_FILE_EXTENSIONS}; // Start with copy
for (const language of Object.keys(fileExtensionsMap) as Language[]) {
const fileExts: string[] = makeUnique(fileExtensionsExtractor.extractArray(language,
const fileExts: string[] = makeUniqueCaseInsensitive(fileExtensionsExtractor.extractArray(language,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the AppExchange rules will need to add in more default file_extensions like .remoteSite... i'd prefer to not force the conversion of our defaults to all be lowercase since .remoteSite looks nicer than .remotesite and is what is all over the public documentation.

But things still work case insensitive as we expect. But it did require me to change the makeUnique function to be a makeUniqueCaseInsensitive routine instead.

Comment on lines +29 to +35
<?xml version="1.0" encoding="UTF-8"?>
<RemoteSiteSetting xmlns="http://soap.sforce.com/2006/04/metadata">
<description>Used for Apex callout to mapping web service</description>
<disableProtocolSecurity>false</disableProtocolSecurity>
<isActive>true</isActive>
<url>https://www.maptestsite.net/mapping1</url>
</RemoteSiteSetting>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1,7 +1,7 @@
{
"name": "@salesforce/code-analyzer-pmd-engine",
"description": "Plugin package that adds 'pmd' and 'cpd' as engines into Salesforce Code Analyzer",
"version": "0.16.1",
"version": "0.16.2-SNAPSHOT",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: I know we typically only do new Minor Versions when Core changes, but does it make sense for us to add these new rules in a patch release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - I agree... now that we have a system in place to keep track of version numbers better... I don't think we need to keep all the engines in sync with their minor version anymore... So i'll make this 0.17.0-SNAPSHOT.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@stephen-carter-at-sf stephen-carter-at-sf merged commit 1e32050 into dev Dec 17, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants